<div class="module">
	<div>
		<p>debug 信息:</p>
		<pre data-bind="text:ko.toJSON($root,null,2)"></pre>
	</div>
	<hr />
	<div class="content">
		<p>activate model,完整的生命周期测试</p>
		<p>如果<code>cacheViews:false</code>,每次进行切换后生命周期的触发顺序(从mod1切换为mod2)为</p>
		<pre>
mod2 is activate
mod2 is binding
Binding app-main/modules/active-model-2/index
mod2 is bindingComplete
mod1 is detached(附加mod2之前把mod1进行detached)
mod2 is attached
mod2 is compositionComplete
</pre>
		<p>如果<code>cacheViews:true</code>,则，第一次加载顺序和上面一致，只是没有<b>mod1 is detached</b>,因为缓存下来了，之后切换生命周期只会触发<b>active</b></p>
		<p>如果<code>cacheViews:true,alwaysTriggerAttach:true</code>,则，第一次加载顺序和上面一致，只是没有<b>mod1 is detached</b>,因为缓存下来了，之后切换生命周期会触发<b>active和attached</b></p>
		<div>
			<button class="btn btn-default btn-success" data-bind="click:function(){changeModel(1)}">Active Model 1</button>
			<button class="btn btn-default" data-bind="click:function(){changeModel(2)}">Active Model 2</button>
			<button class="btn btn-default btn-danger" data-bind="click:function(){changeModel(3)}">Active Model 3</button>
			<button class="btn btn-default" data-bind="click:function(){changeModel(4)}">Active Model 4</button>
			<button class="btn btn-default btn-success" data-bind="click:function(){changeModel(5)}">Active Model 5</button>
			<button class="btn btn-default btn-danger" data-bind="click:function(){changeModel(6)}">Active Model 6</button>
		</div>
		<p>Model:</p>
		<!--<div data-bind="compose:activeView"></div>-->
		<div data-bind="compose:{model:activeView,cacheViews:true,alwaysTriggerAttach:true}"></div>
	</div>
</div>